﻿using Bricks.Business.Models.BidManagement;
using Bricks.Component.Utils;
using Bricks.Site.Models.BidInfo;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bricks.Business.Service
{
    public interface IBidInfoService
    {
        #region 属性
        /// <summary>
        /// 获取查询数据集
        /// </summary>
        IQueryable<BidInfo> Bids { get; }
        #endregion

        #region 公共方法
        /// <summary>
        /// 招标管理列表
        /// </summary>
        /// <returns></returns>
        List<BidListView> GetDataList();

        /// <summary>
        /// 获取招标列表（根据项目ID）
        /// </summary>
        /// <param name="projectID"></param>
        /// <returns></returns>
        List<BidInfo> GetBidsByProjectID(Guid projectID);

        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        OperationResult Add(BidInfo model);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        OperationResult Modify(BidInfo model);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        OperationResult Delete(Guid id);

        /// <summary>
        /// 获取标段列表（根据招标ID）
        /// </summary>
        /// <param name="bidID"></param>
        /// <returns></returns>
        List<SectionListView> GetSectionList(Guid bidID);

        /// <summary>
        /// 保存标段列表
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        OperationResult SaveSectionList(Guid bidID, List<SectionListView> list);

        /// <summary>
        /// 根据标段ID获取标段名称（格式：项目1-招标1-标段1，项目1-招标2-标段3）
        /// </summary>
        /// <param name="secitonIDs"></param>
        /// <returns></returns>
        string GetFullSectionNameByID(List<Guid> secitonIDs);
        #endregion
    }
}
